package ex.com.jm.food.service.impl;





import java.util.List;

import ex.com.jm.food.dao.CompanyDao;
import ex.com.jm.food.entity.Company;
import ex.com.jm.food.entity.CompanyType;
import ex.com.jm.food.service.CompanyService;

public class CompanyServiceImpl implements CompanyService {

	private CompanyDao companyDao;
	
	public CompanyDao getCompanyDao() {
		return companyDao;
	}

	public void setCompanyDao(CompanyDao companyDao) {
		this.companyDao = companyDao;
	}

	public CompanyServiceImpl() {
		// TODO Auto-generated constructor stub
	}

	@Override
	public Object saveCompany(Company company) {
		// TODO Auto-generated method stub
		return this.getCompanyDao().saveCompany(company);
	}

	@Override
	public Company checkEmail(String comEmail) {
		// TODO Auto-generated method stub
		return this.getCompanyDao().checkEmail(comEmail);
	}

	@Override
	public Company checkName(String comName) {
		// TODO Auto-generated method stub
		return this.getCompanyDao().checkName(comName);
	}

	@Override
	public boolean updateCompany(Company company) {
		// TODO Auto-generated method stub
		
		return this.getCompanyDao().updateCompany(company);
	}

	@Override
	public Company selectCompany(String companyId) {
		// TODO Auto-generated method stub
		return this.getCompanyDao().selectCompany(companyId);
	}

	@Override
	public Company comLogin(String name, String pwd) {
		// TODO Auto-generated method stub
		return this.getCompanyDao().comLogin(name, pwd);
	}

	@Override
	public Company checkBankCard(String bankCard) {
		// TODO Auto-generated method stub
		return this.getCompanyDao().checkBankCard(bankCard);
	}

	@Override
	public List<CompanyType> selectComType() {
		// TODO Auto-generated method stub
		return this.getCompanyDao().selectComType();
	}

	@Override
	public CompanyType getComType(int comtypeId) {
		// TODO Auto-generated method stub
		return this.getCompanyDao().getComType(comtypeId);
	}

	@Override
	public boolean updateIDCard(String comId, String cardImage) {
		// TODO Auto-generated method stub
		return this.getCompanyDao().updateIDCard(comId, cardImage);
	}

}
